﻿using System;
using System.Web;
using System.Web.UI.HtmlControls;
using AnyOffice.Components;
using AnyOffice.DAL;
namespace AnyOffice.general.system.workflow.flow_type
{ 
    public partial class type_process_delete : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                int num = (Request.QueryString["flow_id"] == null) ? 0 : int.Parse(Request.QueryString["flow_id"].ToString());
                int num2 = (Request.QueryString["id"] == null) ? 0 : int.Parse(Request.QueryString["id"].ToString());
                bool flag = Request.QueryString["graph"] != null;
                new FlowProcessDao().Delete(base.Conn, num2);
                base.CloseConn();
                if (flag)
                {
                    Response.Redirect("type_view_graph.aspx?flow_id=" + num.ToString());
                }
                else
                {
                    Response.Redirect("type_view_list.aspx?flow_id=" + num.ToString());
                }
            }
        }
      
    }
}

